{% load i18n %}

{% if request.user.is_authenticated %}
<h2>{% trans "No-no-no!" %}</h2>
{% else %}
    {{ error }}
{% load loginza_widget %}
<table><tr>
<td class='loginza_holder'>
    {% loginza_iframe providers_set="google,facebook,twitter,vkontakte,yandex,lastfm" lang="en" %}</td><td>
<form method="post" action="/accounts/login/">
{% if form.errors %}
    {% for error in form.non_field_errors %}
    <span class='error'>{{ error }}</span>
    {% endfor %}
{% endif %}
<table>

    <tr>
        <td>Логин</td><td>{{ form.username }}</td>
    </tr>
    <tr>
        <td>Пароль</td><td>{{ form.password }}</td>
    </tr>
</table>

{% csrf_token %}
  <input type="submit" value="{% trans 'Log in' %}" />
  <input type="button" value="{% trans 'Cancel' %}" id='login_cancel' onclick="$.modal.close()" />
  <input type="hidden" name="next" value="{{ next }}" />
</form>

<p class='display_it'>{% trans "Forgot password" %}? <a href="{% url auth_password_reset %}">{% trans "Reset it" %}</a></p>
<p class='display_it'>{% trans "Not member" %}? <a href="{% url registration_register %}">{% trans "Register" %}</a>!</p>
</td></tr></table>
{% endif %}
